package com.nf.entity;

import com.nf.test.打印机;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class Teacher3 {

    private 打印机 printer;

    @Test
    void 补习(){
        //ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");
        ApplicationContext applicationContext= new FileSystemXmlApplicationContext("D:/myideaproject/test001/src/main/resources/applicationContext.xml");
        //7206W
        printer=(打印机) applicationContext.getBean("7206W");
        printer.打印("今天补习的内容");
    }
}
